import {
  post,
  get,
  put,
  dalete,
  postJosn,
  putone,
  patch,
  daleteJson
} from '../utils/request';

//分页查询酒红包活动列表
export function queryRedPacketActivityList(data) {
  return post('/api/promotion-service/v1/redPacketActivity/queryRedPacketActivityList', data);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/redPacketActivity/queryRedPacketActivityList', data);
}

//获取活动详细
export function queryRedPacketActivityDetail(data){
  return post('/api/promotion-service/v1/redPacketActivity/queryRedPacketActivityDetail', data);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/redPacketActivity/queryRedPacketActivityDetail', data);
}

//挑选酒红包
export function queryChooseRedPacketList(data) {
  return post('/api/promotion-service/v1/redPacketActivity/queryChooseRedPacketList', data);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/redPacketActivity/queryChooseRedPacketList', data);
}

//发布撤回活动
export function updateRedPacketActivityStatus(data) {
  return post('/api/promotion-service/v1/redPacketActivity/updateRedPacketActivityStatus', data);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/redPacketActivity/updateRedPacketActivityStatus', data);
}

//保存活动（全部数据）
export function saveRedPacketActivity(data) {
  return post('/api/promotion-service/v1/redPacketActivity/saveRedPacketActivity', data);
  //return post('http://127.0.0.1:18080/api/promotion-service/v1/redPacketActivity/saveRedPacketActivity', data);
}
